from pydantic_settings import BaseSettings
from typing import List

class Settings(BaseSettings):
    HOST: str = "0.0.0.0"
    PORT: int = 8000
    RELOAD: bool = True
    LOG_LEVEL: str = "INFO"

    API_V1_STR: str = "/api/v1"
    PROJECT_NAME: str = "沥青拌和站数据接收服务"
    DATABASE_URL: str
    ALLOWED_SOURCES: List[str] = ["djgk-sjk"]
    
    # Token配置
    TOKEN_SECRET: str
    TOKEN_EXPIRE_MINUTES: int = 1440
    ALLOWED_TOKENS: List[str] = []

    class Config:
        env_file = "dev.env"

settings = Settings()